<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdvertisTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('advertis', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('clients_id');
            $table->integer('positions_id');
            $table->tinyInteger('priority');
            $table->tinyInteger('position');
            $table->tinyInteger('odds');
            $table->smallInteger('industries_id');
            $table->string('name');
            $table->enum('bliling', ['1', '2', '3', '4', '5']);
            $table->dateTime('starttime');
            $table->dateTime('endtime');
            $table->mediumInteger('day_budget');
            $table->text('put_city')->default('');
            $table->string('put_system', 7)->defalt('1');
            $table->string('link', 300);
            $table->string('button_official', 20);
            $table->string('official', 30);
            $table->string('imgurl', 120);
            $table->decimal('click_price', 5,2)->default(0);
            $table->enum('status', ['1', '2', '3', '4', '5'])->default('3');
            $table->enum('audit', ['1', '2', '3', '4', '5', '6'])->default('4');
            $table->string('remark', 300)->default('');
            $table->enum('switch',['1', '2'])->default('1');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('advertis');
    }
}
